3.2167 \(\int (a c+b c x)^m (f+g x) (a^2+2 a b x+b^2 x^2)^p \, dx\)

Optimal. Leaf size=100 \[ \frac{g \left (a^2+2 a b x+b^2 x^2\right )^p (a c+b c x)^{m+2}}{b^2 c^2 (m+2 p+2)}+\frac{(b f-a g) \left (a^2+2 a b x+b^2 x^2\right )^p (a c+b c x)^{m+1}}{b^2 c (m+2 p+1)} \]

[Out]

((b*f - a*g)*(a*c + b*c*x)^(1 + m)*(a^2 + 2*a*b*x + b^2*x^2)^p)/(b^2*c*(1 + m + 2*p)) + (g*(a*c + b*c*x)^(2 +
m)*(a^2 + 2*a*b*x + b^2*x^2)^p)/(b^2*c^2*(2 + m + 2*p))

________________________________________________________________________________________

Rubi [A]  time = 0.0779676, antiderivative size = 100, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 34, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.088, Rules used = {770, 23, 43} \[ \frac{g \left (a^2+2 a b x+b^2 x^2\right )^p (a c+b c x)^{m+2}}{b^2 c^2 (m+2 p+2)}+\frac{(b f-a g) \left (a^2+2 a b x+b^2 x^2\right )^p (a c+b c x)^{m+1}}{b^2 c (m+2 p+1)} \]

Antiderivative was successfully verified.

[In]

Int[(a*c + b*c*x)^m*(f + g*x)*(a^2 + 2*a*b*x + b^2*x^2)^p,x]

[Out]

((b*f - a*g)*(a*c + b*c*x)^(1 + m)*(a^2 + 2*a*b*x + b^2*x^2)^p)/(b^2*c*(1 + m + 2*p)) + (g*(a*c + b*c*x)^(2 +
m)*(a^2 + 2*a*b*x + b^2*x^2)^p)/(b^2*c^2*(2 + m + 2*p))

Rule 770

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int (a c+b c x)^m (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx &=\left (\left (a b+b^2 x\right )^{-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p\right ) \int \left (a b+b^2 x\right )^{2 p} (a c+b c x)^m (f+g x) \, dx\\ &=\left ((a c+b c x)^{-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p\right ) \int (a c+b c x)^{m+2 p} (f+g x) \, dx\\ &=\left ((a c+b c x)^{-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p\right ) \int \left (\frac{(b f-a g) (a c+b c x)^{m+2 p}}{b}+\frac{g (a c+b c x)^{1+m+2 p}}{b c}\right ) \, dx\\ &=\frac{(b f-a g) (a c+b c x)^{1+m} \left (a^2+2 a b x+b^2 x^2\right )^p}{b^2 c (1+m+2 p)}+\frac{g (a c+b c x)^{2+m} \left (a^2+2 a b x+b^2 x^2\right )^p}{b^2 c^2 (2+m+2 p)}\\ \end{align*}

Mathematica [A]  time = 0.0552653, size = 67, normalized size = 0.67 \[ \frac{(a+b x) \left ((a+b x)^2\right )^p (c (a+b x))^m (-a g+b f (m+2 p+2)+b g x (m+2 p+1))}{b^2 (m+2 p+1) (m+2 p+2)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a*c + b*c*x)^m*(f + g*x)*(a^2 + 2*a*b*x + b^2*x^2)^p,x]

[Out]

((a + b*x)*(c*(a + b*x))^m*((a + b*x)^2)^p*(-(a*g) + b*f*(2 + m + 2*p) + b*g*(1 + m + 2*p)*x))/(b^2*(1 + m + 2
*p)*(2 + m + 2*p))

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 96, normalized size = 1. \begin{align*} -{\frac{ \left ({b}^{2}{x}^{2}+2\,abx+{a}^{2} \right ) ^{p} \left ( bcx+ac \right ) ^{m} \left ( -bgmx-2\,bgpx-bfm-2\,bfp-bgx+ag-2\,bf \right ) \left ( bx+a \right ) }{{b}^{2} \left ({m}^{2}+4\,mp+4\,{p}^{2}+3\,m+6\,p+2 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*c*x+a*c)^m*(g*x+f)*(b^2*x^2+2*a*b*x+a^2)^p,x)

[Out]

-(b^2*x^2+2*a*b*x+a^2)^p*(b*c*x+a*c)^m*(-b*g*m*x-2*b*g*p*x-b*f*m-2*b*f*p-b*g*x+a*g-2*b*f)*(b*x+a)/b^2/(m^2+4*m
*p+4*p^2+3*m+6*p+2)

________________________________________________________________________________________

Maxima [A]  time = 1.13701, size = 173, normalized size = 1.73 \begin{align*} \frac{{\left (b c^{m} x + a c^{m}\right )} f e^{\left (m \log \left (b x + a\right ) + 2 \, p \log \left (b x + a\right )\right )}}{b{\left (m + 2 \, p + 1\right )}} + \frac{{\left (b^{2} c^{m}{\left (m + 2 \, p + 1\right )} x^{2} + a b c^{m}{\left (m + 2 \, p\right )} x - a^{2} c^{m}\right )} g e^{\left (m \log \left (b x + a\right ) + 2 \, p \log \left (b x + a\right )\right )}}{{\left (m^{2} + m{\left (4 \, p + 3\right )} + 4 \, p^{2} + 6 \, p + 2\right )} b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*c*x+a*c)^m*(g*x+f)*(b^2*x^2+2*a*b*x+a^2)^p,x, algorithm="maxima")

[Out]

(b*c^m*x + a*c^m)*f*e^(m*log(b*x + a) + 2*p*log(b*x + a))/(b*(m + 2*p + 1)) + (b^2*c^m*(m + 2*p + 1)*x^2 + a*b
*c^m*(m + 2*p)*x - a^2*c^m)*g*e^(m*log(b*x + a) + 2*p*log(b*x + a))/((m^2 + m*(4*p + 3) + 4*p^2 + 6*p + 2)*b^2
)

________________________________________________________________________________________

Fricas [A]  time = 1.54454, size = 343, normalized size = 3.43 \begin{align*} \frac{{\left (a b f m + 2 \, a b f p + 2 \, a b f - a^{2} g +{\left (b^{2} g m + 2 \, b^{2} g p + b^{2} g\right )} x^{2} +{\left (2 \, b^{2} f +{\left (b^{2} f + a b g\right )} m + 2 \,{\left (b^{2} f + a b g\right )} p\right )} x\right )}{\left (b c x + a c\right )}^{m} e^{\left (2 \, p \log \left (b c x + a c\right ) + p \log \left (\frac{1}{c^{2}}\right )\right )}}{b^{2} m^{2} + 4 \, b^{2} p^{2} + 3 \, b^{2} m + 2 \, b^{2} + 2 \,{\left (2 \, b^{2} m + 3 \, b^{2}\right )} p} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*c*x+a*c)^m*(g*x+f)*(b^2*x^2+2*a*b*x+a^2)^p,x, algorithm="fricas")

[Out]

(a*b*f*m + 2*a*b*f*p + 2*a*b*f - a^2*g + (b^2*g*m + 2*b^2*g*p + b^2*g)*x^2 + (2*b^2*f + (b^2*f + a*b*g)*m + 2*
(b^2*f + a*b*g)*p)*x)*(b*c*x + a*c)^m*e^(2*p*log(b*c*x + a*c) + p*log(c^(-2)))/(b^2*m^2 + 4*b^2*p^2 + 3*b^2*m
+ 2*b^2 + 2*(2*b^2*m + 3*b^2)*p)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*c*x+a*c)**m*(g*x+f)*(b**2*x**2+2*a*b*x+a**2)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.16287, size = 545, normalized size = 5.45 \begin{align*} \frac{{\left (b x + a\right )}^{2 \, p} b^{2} g m x^{2} e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \,{\left (b x + a\right )}^{2 \, p} b^{2} g p x^{2} e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} +{\left (b x + a\right )}^{2 \, p} b^{2} f m x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} +{\left (b x + a\right )}^{2 \, p} a b g m x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \,{\left (b x + a\right )}^{2 \, p} b^{2} f p x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \,{\left (b x + a\right )}^{2 \, p} a b g p x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} +{\left (b x + a\right )}^{2 \, p} b^{2} g x^{2} e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} +{\left (b x + a\right )}^{2 \, p} a b f m e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \,{\left (b x + a\right )}^{2 \, p} a b f p e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \,{\left (b x + a\right )}^{2 \, p} b^{2} f x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \,{\left (b x + a\right )}^{2 \, p} a b f e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} -{\left (b x + a\right )}^{2 \, p} a^{2} g e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )}}{b^{2} m^{2} + 4 \, b^{2} m p + 4 \, b^{2} p^{2} + 3 \, b^{2} m + 6 \, b^{2} p + 2 \, b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*c*x+a*c)^m*(g*x+f)*(b^2*x^2+2*a*b*x+a^2)^p,x, algorithm="giac")

[Out]

((b*x + a)^(2*p)*b^2*g*m*x^2*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*b^2*g*p*x^2*e^(m*log(b*x + a) +
 m*log(c)) + (b*x + a)^(2*p)*b^2*f*m*x*e^(m*log(b*x + a) + m*log(c)) + (b*x + a)^(2*p)*a*b*g*m*x*e^(m*log(b*x
+ a) + m*log(c)) + 2*(b*x + a)^(2*p)*b^2*f*p*x*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*a*b*g*p*x*e^(
m*log(b*x + a) + m*log(c)) + (b*x + a)^(2*p)*b^2*g*x^2*e^(m*log(b*x + a) + m*log(c)) + (b*x + a)^(2*p)*a*b*f*m
*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*a*b*f*p*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*b
^2*f*x*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*a*b*f*e^(m*log(b*x + a) + m*log(c)) - (b*x + a)^(2*p)
*a^2*g*e^(m*log(b*x + a) + m*log(c)))/(b^2*m^2 + 4*b^2*m*p + 4*b^2*p^2 + 3*b^2*m + 6*b^2*p + 2*b^2)